package com.fh.fruit.service.user;

import java.util.List;
import java.util.Map;

import com.fh.entity.Page;
import com.fh.util.PageData;

public interface FruitUserManager {
	
	/**
	 * 用户注册
	 * @param pd
	 * @throws Exception
	 */
	public void saveUser(PageData pd) throws Exception;

	/**保存用户
	 * @param pd
	 * @throws Exception
	 */
	public void saveU(PageData pd) throws Exception;
	
	/**
	 * 添加登录账号
	 * @param pd
	 * @throws Exception
	 */
	public void savaLogin(PageData pd) throws Exception;
	
	/**
	 * 添加账户信息
	 * @param pd
	 * @throws Exception
	 */
	public void savaAccount(PageData pd) throws Exception;
	 
	/**修改用户
	 * @param pd
	 * @throws Exception
	 */
	public void editU(PageData pd) throws Exception;
	
	/**
	 * 删除用户就是把用户的state状态改为02禁止
	 * @param pd
	 * @throws Exception
	 */
	public void updateUserState(PageData pd) throws Exception;
	
	/**批量删除用户
	 * @param USER_IDS
	 * @throws Exception
	 */
	public void deleteAllU(String[] USER_IDS) throws Exception;
	
	/**某角色下的所有用户(全部)
	 * @param USER_IDS
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> listAllUser(PageData pd) throws Exception;
	
	/**会员列表
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public List<Map<String,Object>> listfruitUsers(Page page)throws Exception;

	/**加盟列表
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public List<Map<String,Object>> listJoins(Page page) throws Exception;

	/**加盟信息
	 * @param PageData
	 * @return
	 * @throws Exception
	 */
	public Map<String, Object> getJoinsMsg(PageData pd) throws Exception;

	/**常见问题列表
	 * @param Page page
	 * @return Map<String, Object>
	 * @throws Exception
	 */
	public List<Map<String, Object>> getProblemList(Page page) throws Exception;

	/**常见问题
	 * @param PageData pd
	 * @return Map<String, Object>
	 * @throws Exception
	 */
	public Map<String, Object> getProblem(PageData pd) throws Exception;

	/**修改常见问题
	 * @param PageData pd
	 * @return int
	 * @throws Exception
	 */
	public int updateEdit(PageData pd) throws Exception;

	/**获取父级
	 * @param PageData pd
	 * @return int
	 * @throws Exception
	 */
	public Map<String, Object> getProblemParent(PageData pd)throws Exception;
	
	/**保存问题
	 * @param PageData pd
	 * @return int
	 * @throws Exception
	 */
	public void saveProblem(PageData pd)throws Exception;

	public Object getProblemParentId(PageData pd)throws Exception;

	/**删除问题
	 * @param PageData pd
	 * @throws Exception
	 */
	public void delProblem(PageData pd)throws Exception;

	/**获取注册人数
	 * @param PageData pd
	 * @return int
	 * @throws Exception
	 */
	public int getRegisterNum(PageData pd)throws Exception;

	/**获取用户消费统计人数
	 * @param PageData pd
	 * @return Map<String, Object>
	 * @throws Exception
	 */
	public List<Map<String, Object>> listConsumeUsers(Page page)throws Exception;

	/**获取消费人数
	 * @param PageData pd
	 * @return int
	 * @throws Exception
	 */
	public int getConsumeNum(PageData pd) throws Exception;

	/**获取用户信息
	 * @param PageData pd
	 * @return Map<String, Object> 
	 * @throws Exception
	 */
	public Map<String, Object> getUserDetails(PageData pd) throws Exception;

	/**获取用户信息
	 * @param PageData pd
	 * @return Map<String, Object> 
	 * @throws Exception
	 */
	public Map<String, Object> getWholeDetails(PageData pd) throws Exception;

	/**获取用户购买信息
	 * @param PageData pd
	 * @return Map<String, Object> 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getBuyInfo(PageData pd) throws Exception;

	/**获取用户邀请信息
	 * @param PageData pd
	 * @return Map<String, Object> 
	 * @throws Exception
	 */
	public Map<String, Object> getInviteInfo(PageData pd) throws Exception;

	/**获取用户年龄信息
	 * @param PageData pd
	 * @return Map<String, Object> 
	 * @throws Exception
	 */
	public Map<String,Object> getUserAge(PageData pd)throws Exception;

	/**获取用户地区信息
	 * @param PageData pd
	 * @return Map<String, Object> 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getUserRegion(PageData pd)throws Exception;

	public Map<String, Object> getRatio(PageData pd)throws Exception;

	/**获取邀请信息
	 * @param PageData pd
	 * @return Map<String, Object> 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getInviteNum(PageData pd) throws Exception;

	/**会员列表
	 * @param PageData pd
	 * @return Map<String, Object> 
	 * @throws Exception
	 */
	public List<Map<String, Object>> listUsers(Page page)throws Exception;
}
